From 6988443b40994b567d6ba21566f8b6e46a7f0c88 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Thu, 31 Jul 2003 09:19:21 +0000 Subject: [PATCH] bitkeeper revision 1.389 (3f28df19Z3T_sAYRfO2FBURRnxpp_w) dev.c, perfc_defn.h, perfc.c, domain_page.c: Perfctr hacks and additions. --- xen/common/domain_page.c | 2 ++ xen/common/perfc.c | 20 +++++++++++--------- xen/include/xeno/perfc_defn.h | 3 +++ xen/net/dev.c | 2 ++ 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/xen/common/domain_page.c b/xen/common/domain_page.c index 927ba63ff1..9257aa728a 100644 --- a/xen/common/domain_page.c +++ b/xen/common/domain_page.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -30,6 +31,7 @@ static void flush_all_ready_maps(void) do { if ( (*cache & READY_FOR_TLB_FLUSH) ) *cache = 0; } while ( ((unsigned long)(++cache) & ~PAGE_MASK) != 0 ); + perfc_incr(domain_page_tlb_flush); local_flush_tlb(); } diff --git a/xen/common/perfc.c b/xen/common/perfc.c index 09780a8a88..00f599e881 100644 --- a/xen/common/perfc.c +++ b/xen/common/perfc.c @@ -34,29 +34,31 @@ void perfc_printall(u_char key, void *dev_id, struct pt_regs *regs) for ( i = 0; i < NR_PERFCTRS; i++ ) { + printk("%20s ", perfc_info[i].name); switch ( perfc_info[i].type ) { case TYPE_SINGLE: - printk("%10d 0x%08x %s\n", - atomic_read(&counters[0]), atomic_read(&counters[0]), - perfc_info[i].name); + printk("%10d 0x%08x", + atomic_read(&counters[0]), + atomic_read(&counters[0])); counters += 1; break; case TYPE_CPU: for ( j = 0; j < smp_num_cpus; j++ ) - printk("%10d 0x%08x %s[CPU %02d]\n", - atomic_read(&counters[j]), atomic_read(&counters[j]), - perfc_info[i].name, j); + printk("CPU%02d[%10d 0x%08x] ", + j, atomic_read(&counters[j]), + atomic_read(&counters[j])); counters += NR_CPUS; break; case TYPE_ARRAY: for ( j = 0; j < perfc_info[i].nr_elements; j++ ) - printk("%10d 0x%08x %s[ARR %02d]\n", - atomic_read(&counters[j]), atomic_read(&counters[j]), - perfc_info[i].name, j); + printk("ARR%02d[%10d 0x%08x] ", + j, atomic_read(&counters[j]), + atomic_read(&counters[j])); counters += j; break; } + printk("\n"); } } diff --git a/xen/include/xeno/perfc_defn.h b/xen/include/xeno/perfc_defn.h index a4dfc6b8e1..ad6eaaebf8 100644 --- a/xen/include/xeno/perfc_defn.h +++ b/xen/include/xeno/perfc_defn.h @@ -13,3 +13,6 @@ PERFCOUNTER( net_hypercalls, "network hypercalls" ) PERFCOUNTER( net_rx_capacity_drop, "net rx capacity drop" ) PERFCOUNTER( net_rx_delivered, "net rx delivered" ) PERFCOUNTER( net_rx_tlbflush, "net rx tlb flushes" ) +PERFCOUNTER( net_tx_transmitted, "net tx transmitted" ) + +PERFCOUNTER( domain_page_tlb_flush, "domain page tlb flushes" ) diff --git a/xen/net/dev.c b/xen/net/dev.c index cd5c80111a..a53136deaa 100644 --- a/xen/net/dev.c +++ b/xen/net/dev.c @@ -800,6 +800,8 @@ static void net_tx_action(unsigned long unused) kfree_skb(skb); break; } + + perfc_incr(net_tx_transmitted); } spin_unlock(&dev->xmit_lock); } -- 2.30.2